package com.levi.transaction;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionTemplate;

/**
 * @author shentong
 * @since 2022/11/9 22:15
 */
@Service
public class TransactionService {

    @Autowired
    private TransactionTemplate transactionTemplate;

    public void testTransaction() {
        transactionTemplate.execute(e -> {

            return null;
		});
	}
}
